From 5b6b07f6ef95d9930110314f63d432f8692c433e Mon Sep 17 00:00:00 2001 From: "iap10@labyrinth.cl.cam.ac.uk" Date: Mon, 14 Jul 2003 14:29:39 +0000 Subject: [PATCH] bitkeeper revision 1.344 (3f12be53t1VivuAfELH_J3XUhJ2Frg) more console stuff --- xenolinux-2.4.21-sparse/arch/xeno/defconfig | 23 ++++++++++++++++--- .../arch/xeno/drivers/console/console.c | 21 +++++++++++++++++ xenolinux-2.4.21-sparse/drivers/char/tty_io.c | 7 +++--- .../include/asm-xeno/vga.h | 6 ++--- 4 files changed, 47 insertions(+), 10 deletions(-) diff --git a/xenolinux-2.4.21-sparse/arch/xeno/defconfig b/xenolinux-2.4.21-sparse/arch/xeno/defconfig index e356bce8cf..499389aaaf 100644 --- a/xenolinux-2.4.21-sparse/arch/xeno/defconfig +++ b/xenolinux-2.4.21-sparse/arch/xeno/defconfig @@ -127,16 +127,33 @@ CONFIG_XENOLINUX_BLOCK=y # CONFIG_BLK_DEV_IDE_MODES is not set # CONFIG_BLK_DEV_HD is not set +# +# Console drivers +# +CONFIG_VGA_CONSOLE=y +# CONFIG_VIDEO_SELECT is not set +CONFIG_DUMMY_CONSOLE=y + + # # Character devices # CONFIG_XEN_CONSOLE=y CONFIG_VT=y -CONFIG_VGA_CONSOLE=y -CONFIG_DUMMY_CONSOLE=y -# CONFIG_PSMOUSE is not set +CONFIG_VT_CONSOLE=y # CONFIG_UNIX98_PTYS is not set +# +# Mice +# +# CONFIG_BUSMOUSE is not set +CONFIG_MOUSE=y +CONFIG_PSMOUSE=y +# CONFIG_82C710_MOUSE is not set +# CONFIG_PC110_PAD is not set +# CONFIG_MK712_MOUSE is not set + + # # File systems # diff --git a/xenolinux-2.4.21-sparse/arch/xeno/drivers/console/console.c b/xenolinux-2.4.21-sparse/arch/xeno/drivers/console/console.c index 7ea44bd4c9..e69cd2488e 100644 --- a/xenolinux-2.4.21-sparse/arch/xeno/drivers/console/console.c +++ b/xenolinux-2.4.21-sparse/arch/xeno/drivers/console/console.c @@ -26,6 +26,26 @@ #define XENO_TTY_MINOR 123 +/*** useful function for console debugging -- goes straight to Xen ****/ + +asmlinkage int xprintk(const char *fmt, ...) +{ + va_list args; + unsigned long flags; + int printed_len; + static char printk_buf[1024]; + + /* Emit the output into the temporary buffer */ + va_start(args, fmt); + printed_len = vsnprintf(printk_buf, sizeof(printk_buf), fmt, args); + va_end(args); + + // Useful Hack if things are going wrong very early in the day + (void)HYPERVISOR_console_write(printk_buf, sizeof(printk_buf)); +} + + + /******************** Kernel console driver ********************************/ static void xen_console_write(struct console *co, const char *s, unsigned count) @@ -72,6 +92,7 @@ static struct console xen_console_info = { void xen_console_init(void) { + xprintk("xen_console_init\n"); register_console(&xen_console_info); } diff --git a/xenolinux-2.4.21-sparse/drivers/char/tty_io.c b/xenolinux-2.4.21-sparse/drivers/char/tty_io.c index ad22d9eaf7..5e9e3c1d98 100644 --- a/xenolinux-2.4.21-sparse/drivers/char/tty_io.c +++ b/xenolinux-2.4.21-sparse/drivers/char/tty_io.c @@ -2238,13 +2238,14 @@ void __init console_init(void) disable_early_printk(); #endif +#ifdef CONFIG_XEN_CONSOLE + xen_console_init(); +#endif + #ifdef CONFIG_VT con_init(); #endif -#ifdef CONFIG_XEN_CONSOLE - xen_console_init(); -#endif #ifdef CONFIG_AU1000_SERIAL_CONSOLE au1000_serial_console_init(); #endif diff --git a/xenolinux-2.4.21-sparse/include/asm-xeno/vga.h b/xenolinux-2.4.21-sparse/include/asm-xeno/vga.h index dc49a29529..7d25414050 100644 --- a/xenolinux-2.4.21-sparse/include/asm-xeno/vga.h +++ b/xenolinux-2.4.21-sparse/include/asm-xeno/vga.h @@ -49,9 +49,7 @@ static unsigned long VGA_MAP_MEM(unsigned long x) return 0; } -static inline unsigned char vga_readb(unsigned char * x) { -xprintk("vr %p\n",x);return (*(x)); } -static void vga_writeb(unsigned char x, unsigned char *y) { -xprintk("vw %02x %p\n",x,y); *(y) = (x); } +static inline unsigned char vga_readb(unsigned char * x) { return (*(x)); } +static inline void vga_writeb(unsigned char x, unsigned char *y) { *(y) = (x); } #endif -- 2.30.2